package com.yt.service;

import com.yt.entity.CommonResult;
import com.yt.entity.Novel;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;
@Component
@FeignClient("FEIGN-PROVIDER")
public interface NovelService {


    @RequestMapping("/timeout")
    public String feigntimeout();

    @GetMapping("/novel/{aid}")
    public CommonResult<List<Novel>> getNovelsByAid(@PathVariable("aid")Integer aid);
}
